Determining an architectural layout

ABSTRACT

A computer-implemented method for determining an architectural layout. The method comprises providing a cycle of points that represents a planar cross section of a cycle of walls, and, assigned to each respective point, a respective first datum that represents a direction normal to the cycle of points at the respective point. The method also comprises minimizing a Markov Random Field energy thereby assigning, to each respective point, a respective one of the set of second data. The method also comprises identifying maximal sets of consecutive points to which a same second datum is assigned, and a cycle of vertices bounding a cycle of segments which represents the architectural layout. Such a method constitutes an improved solution for determining an architectural layout.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims priority under 35 U.S.C. § 119 or 365 toEuropean Application No. EP 17305523.7, filed May 9, 2017. The entirecontents of the above application(s) are incorporated herein byreference.

FIELD OF THE INVENTION

The invention relates to the field of computer programs and systems, andmore specifically to a method, system and program for determining anarchitectural layout.

BACKGROUND

A number of systems and programs are offered on the market for thedesign, the engineering and the manufacturing of objects. CAD is anacronym for Computer-Aided Design, e.g. it relates to software solutionsfor designing an object. CAE is an acronym for Computer-AidedEngineering, e.g. it relates to software solutions for simulating thephysical behavior of a future product. CAM is an acronym forComputer-Aided Manufacturing, e.g. it relates to software solutions fordefining manufacturing processes and operations. In such computer-aideddesign systems, the graphical user interface plays an important role asregards the efficiency of the technique. These techniques may beembedded within Product Lifecycle Management (PLM) systems. PLM refersto a business strategy that helps companies to share product data, applycommon processes, and leverage corporate knowledge for the developmentof products from conception to the end of their life, across the conceptof extended enterprise. The PLM solutions provided by Dassault Systèmes(under the trademarks CATIA, ENOVIA and DELMIA) provide an EngineeringHub, which organizes product engineering knowledge, a Manufacturing Hub,which manages manufacturing engineering knowledge, and an Enterprise Hubwhich enables enterprise integrations and connections into both theEngineering and Manufacturing Hubs. All together the system delivers anopen object model linking products, processes, resources to enabledynamic, knowledge-based product creation and decision support thatdrives optimized product definition, manufacturing preparation,production and service.

In this context and other contexts, scene understanding and semanticextraction in a 3D point cloud are gaining wide importance.

Different algorithms have been developed in order to reconstruct in 3Dan environment, such as a room. This is notably the case of thesolutions described in the following papers, which are based on using anRGB camera:

-   R. Newcombe, S. Lovegrove, A. Davison, “DTAM: Dense Tracking and    Mapping in Real-Time”, in ICCV 2011.-   P. Tanskanen, K. Kolev, L. Meier, F. Camposeco, O. Saurer, M.    Pollefeys, “Live Metric 3D Reconstruction on Mobile Phones”, in ICCV    2013.-   J. Engel, T. Schöps, D. Cremers, “LSD-SLAM: Large-Scale Direct    Monocular SLAM”, in ECCV 2014.

This is also the case of the solutions described in the followingpapers, which are based on using an RGB-depth camera:

-   T. Whelan, J. McDonald, M. Kaess, M. Fallon, H. Johannsson, J.    Leonard, “Kintinuous; Spatially Extended KinectFusion”, in MIT    Technical Report, 2012.-   Q. Zhou, S. Miller, V. Koltun, “Elastic Fragments for Dense Scene    Reconstruction”, in ICCV 2013.-   S. Choi, Q. Zhou, V. Koltun, “Robust Reconstruction of Indoor    Scenes”, in CVPR 2015.

Many of these algorithms still produce noisy raw 3D data, like 3D pointclouds or simple meshes. It may be hard to exploit such a 3Dreconstruction in high level applications. More information may beneeded to exploit a virtual environment, such as a segmentation of theobjects and canonical shapes (e.g. planes) inside the scene, aclassification of each object, a retrieval of each object in a 3Ddatabase, a semantic associated to the layout of the scene, a scenegraph, etc. These complex tasks constitute the so-called SceneUnderstanding problem in the literature, addressed notably in thefollowing papers:

-   H. Koppula, A. Anand, T. Joachims, A. Saxena, “Semantic Labeling of    3D Point Clouds for Indoor Scenes”, in NIPS 2011.-   L. Nan, K. Xie, A. Sharf, “A Search-Classify Approach for Cluttered    Inddor Scene Understanding”, in SIGGRAPH Asia 2012.-   W. Choi, Y. Chao, C. Pantofaru, S. Savarese, “Understanding Indoor    Scenes Using 3D Geometric Phrases”, in CVPR 2013.-   D. Lin, S. Fidler, R. Urtasun, “Holistic Scene Understanding for 3D    Object Detection with RGBD Cameras”, in ICCV 2013.-   S. Satkin, M. Hebert, “3DNN: Viewpoint Invariant 3D Geometry    Matching for Scene Understanding”, in ICCV 2013.-   M. Hueting, M. Ovsjanikov, N. Mitra, “CrossLink: Joint Understanding    of Image and 3D Model Collections through Shape and Camera Pose    Variations”, in SIGGRAPh Asia 2015.

Some recent advances provide ways to perform a scene understanding taskduring the 3D reconstruction process. This is notably the case in thefollowing papers:

-   Y. Furukawa, B. Curless, S. Seitz, “Reconstructing Building    Interiors from Images”, in ICCV 2009.-   Y. Kim, N. Mitra, D. Yan, L. Guibas, “Acquiring 3D Indoor    Environments with Variability and Repetition”, in SIGGRAPH Asia    2012.-   R. Salas-Moreno, R. Newcombe, H. Strasdat, P. Kelly, A. Davison,    “SLAM++: Simultaneous Localisation and Mapping at the Level of    Objects”, in CVPR 2013.-   R. Salas-Moreno, B. Glocker, P. Kelly, A. Davison, “Dense Planar    SLAM”, in ISMAR 2014.-   Hermans, G. Floros, B. Leibe, “Dense 3D Semantic Mapping of Indoor    Scenes from RGB-D Images”, in ICRA 2014.

Nevertheless, these known solutions mainly remain limited to therecognition and clustering of the objects, as well as the segmentationof planes constituting the 3D scene. That is why scene understanding isusually performed on complete data, once the 3D reconstruction is done.

Now, solutions that aim in specific at extracting the layout of a 3Dreconstructed indoor scene also exist. Such a determination of anarchitectural layout has many applications in Scene Modeling, SceneUnderstanding, Augmented Reality, and all domains where it is necessaryto precisely build an accurate 3D indoor scene or to get accuratemeasurements. Two main families of methods exist in the state of theart: methods based on learning algorithms to cluster the walls, ceilingand floor, and methods based on pure geometric hypotheses to extract thelayout (for instance, the room is a cuboid, the walls are vertical andtheir projection is a line on the floor plan, etc).

A known solution uses a probabilistic graphical model to infer thewalls, ceiling and floor, given the RGB-Depth data:

-   X. Xiong, D. Huber, “Using Context to Create Semantic 3D Models of    Indoor Environments”, in BMVC 2010.

Other papers show how to use depth and RGB data to identify the wallplanes and corner edges:

-   ç. Yapicilar, B. Bölümü, D. Okulu, I. Türkiye, N. Arica, “3D Spatial    Layout Extraction of Indoor Images using RGB-D Data”, in SIU 2013.-   J. Zhang, C. Kan, A. Schwing, R. Urtasun, “Estimating the 3D Layout    of Indoor Scenes and its Clutter from Depth Sensors”, in ICCV 2013.

The solution developed in the latter paper in particular makes thestrong assumption that the layout of the indoor scene is a simplecuboid. It uses Conditional Random Fields to separate the clutter fromthe walls.

A solution which does not make such assumption also exists, where thelayout can even be non-convex:

-   C. Mura, O. Mattausch, A. Villanueva, E. Gobbetti, R. Pajarola,    “Automatic Room Detection and Reconstruction in Cluttered Indoor    Environments with Complex Room Layouts”, in Computer&Graphics 2014.

This paper aims at identifying the different rooms in the final layoutof the reconstructed indoor scene. It identifies the walls despite theocclusions, and projects them on the floor plan, in order to build acell graph which will be used to cluster the different rooms of theindoor scene. But this paper assumes that the reconstructed 3D pointcloud comes from a laser scanner located inside each room at a fixposition. Moreover this method is not able to detect fine details in thelayout.

A solution which only uses a set of monocular images also exists, whichis thus prone to many ambiguities and does not provide an absolutemetric of the layout:

-   C. Liu, A. Schwing, K. Kundu, R. Urtasun, S. Fidler, “Rent3D:    Floor-Plan Priors for Monocular Layout Estimation”, in CVPR 2015.

Moreover this paper makes the strong Manhattan-world assumption, meaningthat each pair of walls has to be either parallel or perpendicular. Themethod uses an optimization, to infer the layout of each room and tochoose the room in the floor plan in which each photo was taken.

Within this context, there is still a need for an improved solution fordetermining an architectural layout.

SUMMARY OF THE INVENTION

It is therefore provided a computer-implemented method for determiningan architectural layout. The method comprises providing a cycle ofpoints that represents a planar cross section of a cycle of walls. Themethod also comprises providing, assigned to each respective point, arespective first datum that represents a direction normal to the cycleof points at the respective point. The method also comprises minimizinga Markov Random Field (MRF) energy. The MRF energy is defined on thecycle of points with labels. The labels take values in a set of seconddata. Each second datum represents a respective direction normal to thelayout. By the minimization, the method assigns, to each respectivepoint, a respective one of the set of second data. The MRF energycomprises a unary term. The unary term penalizes, for each point, anangular distance between the direction represented by the assignedsecond datum and the direction represented by the assigned first datum.The MRF energy further comprising a binary term. The binary termincreasingly penalizes, for each couple of consecutive points, anangular distance between the directions represented by the assignedsecond data as an angular distance between the directions represented bythe assigned first data decreases. The method also comprises identifyingmaximal sets of consecutive points to which a same second datum isassigned. The method also comprises determining a cycle of verticesbounding a cycle of segments. The cycle of segments represents thearchitectural layout. Each segment corresponds to a respective wall.Each segment fits a respective maximal set and is normal to thedirection represented by the second datum assigned to the points of therespective maximal set.

Such a method provides an improved solution for determining anarchitectural layout.

Notably, thanks to the minimization of an MRF energy, the method canperform relatively robustly and/or fast. Furthermore, the specific MRFenergy involved allows the method to at least reduce problems of theprior art. Relative to the prior art, the method is less prone to noisydata, the method can extract a full or at least larger layout, themethod can reconstruct a precise layout (e.g. including fine details),the method may exclude making assumptions on the shape of the layout(e.g. Manhattan-world and/or cuboid assumption) or on the occlusionsand/or the position of a sensor which acquired a 3D point cloud (e.g.from which the cycle of points is derived), the method may exclude theneed of any color data in the provided data, the method may exclude theneed to perform any prior machine learning (e.g. to learn parameters ona labeled dataset).

The method may comprise one or more of the following:

-   -   the minimizing of the MRF energy is exact;    -   the minimizing of the MRF energy is performed via one or more        belief propagations;    -   the first data and the second data are vectors, and the angular        distance between the direction represented by an assigned second        datum N_(k) and the direction represented by an assigned first        datum n_(i) is of the type D(x_(i),k)=1−|N_(k)·n_(i)|, the        angular distance between the directions represented by assigned        second data N_(k) and N_(m) is of the type 1_(k≠m), and/or the        angular distance between the directions represented by assigned        first data n_(i) and n_(j) is of the type |n_(i)·n_(j)|;    -   the MRF energy is of the type E(l(x₀), . . . ,        l(x_(n−1)))=Σ_(i=0) ^(n−1)D(x_(i),l(x_(i)))+λΣ_(i=0)        ^(n−1)S(x_(i),x_(i+1), l(x_(i)), l(x_(i+1))), where {x₀, . . . ,        x_(n−1)} is the cycle of points, with i+1=0 when i=n−1,        D(x_(i),l(x_(i))) is the unary term, S(x_(i),x_(i+1),        l(x_(i)),l(x_(i+1))) is the binary term, and is a positive        number;    -   each respective vertex corresponds to a respective first point        and to a respective second point, the respective first point        being the ending point of the maximal set corresponding to a        respective segment bounded by the respective vertex, the        respective second point being the starting point of the maximal        set corresponding to the respective other segment bounded by the        respective vertex, the determining of the respective vertex        comprising determining an initial position of the respective        vertex as a function of the respective first point and the        respective second point, and optimizing the initial position;    -   the function of the respective first point and the respective        second point is the mean function;    -   the optimizing minimizes a cost function that penalizes for each        respective segment a distance between a resulting value of a        length of the respective segment from the initial value of the        length of the respective segment;    -   the cycle of points is a concave hull of a 2D point cloud that        corresponds to a projection of a 3D point cloud representing the        cycle of walls on a projection plane, the projection plane        corresponding to the planar cross section;    -   the projection plane represents the floor plane and/or the        projection is a vertical projection;    -   the providing of the cycle of points comprises providing a 3D        point cloud representing a room that includes the cycle of        walls, identifying the projection plane and the 3D point cloud        representing the cycle of walls from the 3D point cloud        representing the room, projecting the 3D point cloud        representing the cycle of walls on the projection plane,        determining the 2D point cloud, and determining the concave        hull;    -   the identifying of the projection plane and of the 3D point        cloud representing the cycle of walls comprises detecting planes        in the 3D point cloud representing the room with a random sample        consensus algorithm; and/or    -   the determining of the 2D point cloud comprises, for each        detected plane, projecting the result of the projection of the        plane on a linear regression of the result.

It is further provided a computer program comprising instructions forperforming the method.

It is further provided a device comprising a data storage medium havingrecorded thereon the computer program. The device may form anon-transitory computer-readable medium. The device may alternativelycomprise a processor coupled to the data storage medium. The device maythus form a system. The system may further comprise a graphical userinterface coupled to the processor. The system may further compriseand/or be connectable and/or connected to one or more sensor(s) coupledto the processor and configured to capture a 3D point cloud representinga room and from which the cycle of points may be determined. Thesensor(s) may include one or more transportable sensor(s). The sensor(s)may include one or more depth sensor(s), RGB-depth sensor(s) and/or oneor more laser scanner(s).

BRIEF DESCRIPTION OF THE DRAWINGS

Embodiments of the invention will now be described, by way ofnon-limiting example, and in reference to the accompanying drawings,where:

FIGS. 1, 2, 3, 4, 5, 6, 7, 8 and 9 illustrate examples of the method;and

FIG. 10 shows an example of the system.

DETAILED DESCRIPTION OF THE INVENTION

The term “datum” designates a piece of data. The term “data” designatesa plurality of such pieces of data.

The term “cycle” corresponds to the mathematical notion of “cyclic set”.A wall is a quadrilateral material structure. A cycle of walls is a(e.g. finite) set of such quadrilaterals connected edge-by-edge, eachquadrilateral being connected to exactly two other quadrilaterals onopposite edges, so that the set forms a ring. The cycle of walls maycorrespond to the walls of a room. The room also includes a floor, andmay optionally also include a ceiling or alternatively be open on itsupper side. The walls of a room may be the quadrilateral panel structureon the floor, for example between the floor and a ceiling. Such wallsmay comprise apertures (such as windows, doors, or other holes). Thewalls may in examples be vertical. In such a case the points may stemfrom a vertical projection of a 3D point cloud representing the walls ona horizontal plane, the planar cross section being a horizontal crosssection, for example corresponding to the floor plane.

The cycle of walls may form a structure different from a cuboid. Thecycle of walls may comprise pairs of consecutive walls which areconnected at an angle different from 90°. The cycle of walls maycomprise a number of walls different from 4.

The expression “architectural layout” designates informationrepresenting the way architectural structures are arranged. The cycle ofvertices determined by the method corresponds to a cycle of segments,each segment being bounded and thus defined by a pair of consecutivevertices of the cycle of vertices, and each segment corresponds to arespective wall of the cycle of walls. Thus, the cycle of verticesrepresents the arrangement between the walls. Such relatively fineinformation represents an architectural layout, as opposed to theprovided cycle of points which may represent the planar cross section ofthe cycle of walls in a raw manner.

The method may further determine a 3D layout, for example correspondingto an extrusion of the cycle of segments, for example between a floorplane and a ceiling plane which may be pre-provided or determined withinthe method.

The first data may be determined, for example at an initial stage of themethod, for example based (e.g. solely) on the cycle of points. A firstdatum represents a direction normal to the cycle of points at therespective point. The first datum may approximate the real normal of thecross section of the wall at the respective point. The first datum maybe a vector. The first datum may represent a direction normal to asegment bounded by two points each on a respective side of therespective point, for example two points on a graph corresponding to thecycle of points which are below a distance threshold (relative to therespective point), for example each at a distance exactly equal to thethreshold. The distance may be a graph distance. The two points may forexample be the two points adjacent to the respective point in the cycleof points. In a cycle, two adjacent elements are by definition twoelements where one is consecutive to the other in the cycle.

A second datum represents a respective direction normal to the layout atthe point to which it is assigned. The second data may be vectors, asthe first data. The set of second data may be smaller than the set offirst data. The labels take values in a set of second data which may befinite and/or predetermined. The set of second data may correspond toa—e.g. regular—sampling of a range of angles, e.g. [0°, 360°] or [0°,180°], each angle defining a direction relative to any common referenceaxis or vector (which may be arbitrary). The sampling may comprise thevalue 0°, a number of values lower or equal to 360, 180, 90, 45, 30, 15,and/or a number of values higher or equal to 1, 2, 4 or 10. The samplingmay e.g. be {0°, 45°, 90°, 135°} or {0°, 15°, 30°, 45°, 60°, 75°, 90°,105°, 120°, 135°, 150°, 165°}.

The minimizing of the MRF energy may be an exact minimization or apseudo minimization. The method in essence aims at cleaning, correctingand/or organizing the rough information provided by the first data intoinformation which allow identifying walls. The MRF operates suchcleaning, correction and/or organization thanks to penalization termsthat take into account the first data.

The unary term penalizes, for each point, an angular distance betweenthe direction represented by the assigned second datum and the directionrepresented by the assigned first datum. In other words, the MRFminimization tends to assign to each point a second datum representing adirection close to the one represented by its already assigned firstdatum. The unary term thus constitutes a cost function which is anincreasing function of the angular distance. The increasing is notnecessarily strict, but the cost function is not constant.

The binary term increasingly penalizes, for each couple of consecutivepoints, an angular distance between the directions represented by theassigned second data as an angular distance between the directionsrepresented by the assigned first data decreases. In other words, theMRF minimization tends to assign to two consecutive points second datarepresenting directions close one to the other, at least when theirfirst data represent directions that are close one to the other. Thebinary term thus constitutes a cost function which is, for a given valueof the angular distance between the directions represented by theassigned second data, a decreasing function of the angular distancebetween the directions represented by the assigned first data, and, fora given value of the angular distance between the directions representedby the assigned first data, an increasing function of the angulardistance between the directions represented by the assigned second data.Said increasing and decreasing are not necessarily strict, but for atleast one given value of the angular distance between the directionsrepresented by the assigned first data, the increasing function is notconstant.

A maximal set of consecutive points to which a same second datum isassigned is for any given point, the largest set of consecutive pointsincluding the given point assigned with the same second datum which isassigned to the given point.

The maximal sets are fitted with segments (bounded by the determinedvertices). This means that the vertices are determined such thatsegments are each localized at a position corresponding to the points ofa respective maximal set. The fitting may correspond to any suchpositioning, provided that the segment is normal to the directionrepresented by the second datum assigned to the points of the respectivemaximal set. An example is provided later.

The method is computer-implemented. This means that steps (orsubstantially all the steps) of the method are executed by at least onecomputer, or any system alike. Thus, steps of the method are performedby the computer, possibly fully automatically, or, semi-automatically.In examples, the triggering of at least some of the steps of the methodmay be performed through user-computer interaction. The level ofuser-computer interaction required may depend on the level of automatismforeseen and put in balance with the need to implement user's wishes. Inexamples, this level may be user-defined and/or pre-defined.

A typical example of computer-implementation of a method is to performthe method with a system adapted for this purpose. The system maycomprise a processor coupled to a memory and a graphical user interface(GUI), the memory having recorded thereon a computer program comprisinginstructions for performing the method. The memory may also store adatabase. The memory is any hardware adapted for such storage, possiblycomprising several physical distinct parts (e.g. one for the program,and possibly one for the database).

The method generally manipulates modeled objects. A modeled object isany object defined by data stored e.g. in the database. By extension,the expression “modeled object” designates the data itself. According tothe type of the system, the modeled objects may be defined by differentkinds of data. The system may indeed be any combination of a CAD system,a CAE system, a CAM system, a PDM system and/or a PLM system. In thosedifferent systems, modeled objects are defined by corresponding data.One may accordingly speak of CAD object, PLM object, PDM object, CAEobject, CAM object, CAD data, PLM data, PDM data, CAM data, CAE data.However, these systems are not exclusive one of the other, as a modeledobject may be defined by data corresponding to any combination of thesesystems. A system may thus well be both a CAD and PLM system.

By CAD system, it is additionally meant any system adapted at least fordesigning a modeled object on the basis of a graphical representation ofthe modeled object, such as CATIA. In this case, the data defining amodeled object comprise data allowing the representation of the modeledobject. A CAD system may for example provide a representation of CADmodeled objects using edges or lines, in certain cases with faces orsurfaces. Lines, edges, or surfaces may be represented in variousmanners, e.g. non-uniform rational B-splines (NURBS). Specifically, aCAD file contains specifications, from which geometry may be generated,which in turn allows for a representation to be generated.Specifications of a modeled object may be stored in a single CAD file ormultiple ones. The typical size of a file representing a modeled objectin a CAD system is in the range of one Megabyte per part. And a modeledobject may typically be an assembly of thousands of parts.

In the context of CAD, a modeled object may typically be a 3D modeledobject, e.g. representing a product such as a part or an assembly ofparts, or possibly an assembly of products. By “3D modeled object”, itis meant any object which is modeled by data allowing its 3Drepresentation. A 3D representation allows the viewing of the part fromall angles. For example, a 3D modeled object, when 3D represented, maybe handled and turned around any of its axes, or around any axis in thescreen on which the representation is displayed. This notably excludes2D icons, which are not 3D modeled. The display of a 3D representationfacilitates design (i.e. increases the speed at which designersstatistically accomplish their task).

The computer program may comprise instructions executable by a computer,the instructions comprising means for causing the above system toperform the method. The program may be recordable on any data storagemedium, including the memory of the system. The program may for examplebe implemented in digital electronic circuitry, or in computer hardware,firmware, software, or in combinations of them. The program may beimplemented as an apparatus, for example a product tangibly embodied ina machine-readable storage device for execution by a programmableprocessor. Method steps may be performed by a programmable processorexecuting a program of instructions to perform functions of the methodby operating on input data and generating output. The processor may thusbe programmable and coupled to receive data and instructions from, andto transmit data and instructions to, a data storage system, at leastone input device, and at least one output device. The applicationprogram may be implemented in a high-level procedural or object-orientedprogramming language, or in assembly or machine language if desired. Inany case, the language may be a compiled or interpreted language. Theprogram may be a full installation program or an update program.Application of the program on the system results in any case ininstructions for performing the method.

The method may be applied to extract the full layout of a room, forexample rather than to just cluster the walls from the clutter orextract a partial layout. The method may exclude any learning step fromlabeled training samples. The method may exclude the use of any RGBdata, as the method may work on uncolored point clouds. The method isrobust to noise in the input data. The method may be applied with any 3Dpoint cloud reconstructed with any sensor or algorithm. The method mayexclude making any strong assumptions on the layout. The layout does notneed to correspond to a cuboid or to respect the Manhattan-worldassumption, and it can be non-convex. The extracted layout can containfine details in the architecture. The algorithm underlying the methodmay be constrained to provide a layout whose possible angles between thewalls belong to a finite specified set (e.g. {0°, 45°, 90°, 135°}), forexample in order to enforce what may be considered as a plausible andaccurate layout. The method may also provide an accurate metric in thefinal layout, given the 3D reconstructed scene owns such a metric.

The method may form a robust approach and be implemented by a system ordevice that may take as input a 3D point cloud of an indoor room,without color, and extract automatically a layout from it, even in thepresence of noise in the point cloud. The outputted inner angles of thelayout's walls may be relatively highly accurate.

FIG. 1 shows an example of a process which integrates the method.

The process of FIG. 1 comprises operating a depth sensor inside a roomso as to acquire data that allow reconstructing a 3D point cloud. The 3Dpoint cloud may then be inputted to the method to automatically extracta layout.

FIG. 2 shows a general view of an example of the method, that may beapplied to perform the layout determination in the process of FIG. 1.

The method of FIG. 2 detects in the reconstructed 3D point cloud thewalls, the ceiling, and the floor, e.g. using a planar patchesextraction algorithm e.g. based on the RANSAC algorithm. Then the methodof FIG. 2 extracts a contour (e.g. concave hull) of the projected pointcloud e.g. on the floor plan. Next the method of FIG. 2 uses the MRFoptimization to segment the identified walls of the layout, and to inferthe right angles between each wall and the next wall. Then, the methodof FIG. 2 further optimizes the final layout with constraints inferredby the result of the MRF optimization. The method finally outputs apolyhedral 3D layout of the indoor scene.

A detailed example of the method is now described with reference to theflowchart of FIG. 3. The example of the method is referred to as “themethod” in the following. Steps of the method are representedsequentially on the figure, but said steps may be either sequential orinterlaced.

The method comprises capturing S12 a 3D point cloud representing a room(also referred to as “scene”). The 3D point cloud may consist of a rawset of 3D points or of the vertices of a 3D mesh. The 3D point cloud mayexclude any color data. The capturing S12 may be performed in any way,for example by making measurements with one or more sensors anddetermining the 3D point cloud from the measurements. The one or moresensors may include or consist of any sensor(s) configured for suchpurpose, for example non-mere RGB sensors, for example depth, RGB-depthand/or laser scan sensors. In other examples, the 3D point cloud may beprovided in any other way, for example received from a distant system orretrieved in a database.

The 3D point cloud represents positions on different structures of theroom, including the walls, and possibly other structures such as thefloor, the ceiling, and/or any structure inside the room such asfurniture or other objects. The capturing S12 may include performingmeasurements inside the room on said structures, for example pointing adevice that includes the one or more sensors to said structures. Thecapturing S12 may be performed by one or more humans transporting thedevice inside the room and manipulating the device to perform themeasurements, for example as the device is hand-carried. This offershigh ergonomics. The capturing S12 may even be integrated in a globalprocess where such human(s) transports the device inside a wholebuilding. In such a case, the assignment of the captured data todifferent rooms may be performed in any way and the method may be runindependently for each room.

The method then comprises an optional pre-processing S14 of the 3D pointcloud. In other examples, the 3D point cloud may be inputted directly tothe next step of the method. The pre-processing S14 allows the rest ofthe method to work on relatively clean data and thereby perform morerobustly.

The pre-processing S14 may comprise filtering the input point cloudusing a voxelization grid in order to get a uniform density of points inthe scene. The pre-processing S14 may then apply a Principal ComponentAnalysis (PCA) to the point cloud in order to align the main frame withits principal axes.

At this stage, a z vector may also be assigned to the 3D point cloud.For example, the z vector may by convention be set to be the principalaxis associated to the lowest variance axis of the PCA. Thus the z axisnow refers approximately to the vertical axis of the indoor scene, i.e.the axis orthogonal to the floor.

The method then comprises detecting S22 (e.g. all) planes in the 3Dpoint cloud representing the room, with a random sample consensusalgorithm in the example but alternatively with any other algorithmconfigured for that.

The random sample consensus algorithm may be as described in thefollowing paper:

-   R. Hartley, A. Zisserman, “Multiple View Geometry in Computer    Vision”, in Cambridge University Press 2003.

The next step consists in determining S24 the candidate walls in allthese planes detected by the RANSAC algorithm and a projection plane.The projection plane may be selected among the ceiling and the floor,which may optionally also be determined at S24 and outputted to theremainder of the method. Alternatively, the projection plane may becomputed based on the determined candidate walls for example as anorthogonal plane.

In a particularly efficient example, the method may identify the planesthat are possibly walls by selecting the planes whose normal and the zvector form an angle greater than a predetermined threshold (e.g. higherthan 50° or 60°, for example 75°). The ceiling may be identified asbeing the plane which has the highest centroid along the z axis, of allthe planes whose normal and the z vector form an angle lower than apredetermined threshold (e.g. lower than 50° or 40°, for example 20°).The floor may be identified as being the plane which has the lowestcentroid along the z axis, of all the planes whose normal and the zvector form an angle lower than a predetermined threshold (e.g. lowerthan 50° or 40°, for example 20°). Finally, the method may optionallyrun a simple Euclidean clustering using a kd-Tree to split the candidatewalls in different consistent planar patches, and thus get more accuratecandidate walls.

As can be noticed, the algorithm may detect candidate walls inside theroom which are actually not walls. Also, the floor and the ceiling maybe inverted, as at this stage the method does not know if the z axispoints towards the ceiling or the floor. But these are not issues thanksto later steps of the method.

FIG. 4 shows the result of performing S14-S24 to the 3D point cloudillustrated on FIGS. 1-2.

The method then comprises projecting S30 the 3D point cloud representingthe cycle of walls on the projection plane, for example the floor plane.The projection S30 may be vertical. In other words, the method projectsthe points belonging to the candidate walls, ceiling, and floor, on thefloor plane, leading to a 2D representation of the point cloud. The 2Dpoint cloud thereby obtained is a representation seen from the above.Each projected candidate wall is now approximately a line on the floorplane.

For each plane detected as representing a wall, the method performs alinear regression S42 of the result of the projection. In other words,the method regresses e.g. by least squares the best line for eachcandidate wall. The method then projects S44 the 2D points of each wallon its fitted line and outputs S46 the result. This allows filteringnoise in the input scan.

FIG. 5 shows the 3D point cloud outputted after performing S30-S46 tothe 3D point cloud of FIG. 4.

The method then determines S52 a concave hull of the outputted 2D pointcloud. This can be performed in any way. In alternatives to the methodof FIG. 3, the concave hull is provided as such, for example receivedfrom a distant system or retrieved in a database.

In an example that was tested to provide particularly good results, thedetermining S52 may be performed by extracting the alpha shape of the 2Dpoint cloud outputted at S46.

This may be performed as described in the following paper:

-   N. Akkiraju, H. Edelsbrunner, M. Facello, P. Fu, E. Mucke, C.    Varela, “Alpha Shapes: Definition and Software”, in International    Computational Geometry Software Workshop 1995.

The alpha shape represents a hull of the 2D point cloud. The largeralpha is, the more convex the hull given by the alpha shape is. Anefficient scheme to adjust the alpha value may be as following. Themethod may start from alpha=200 for a point cloud in millimeters. At theend of the whole pipeline, the method may compare the perimeter of thelayout P with the length of the alpha shape L and the length of theconvex hull of the projected point cloud C. If

${\frac{{L - P}}{L} > {0.15\mspace{14mu} {or}\mspace{14mu} \frac{{C - P}}{L}} > {0.25\mspace{14mu} {or}\mspace{14mu} 0.95\mspace{14mu} C} > P},$

then the algorithm may restart from this step after increasing alpha by100×i where i the current iteration.

FIG. 6 illustrates such an alpha shape obtained from the 2D point cloudof FIG. 5.

The determining S52 allows to input to the MRF a clean cycle of pointsthat represents a planar cross section of the cycle of walls along theprojection (e.g. floor) plane (yet in a raw manner at this stage). Thecycle of points thus forms the concave hull of a 2D point cloud, wherethe 2D point cloud corresponds to a projection of a 3D point cloudrepresenting the cycle of walls on a projection plane such as the floorplane and the expression “corresponds to” encompasses the option toreduce noise by projecting points on the result of a wall-wise linearregression (as performed in S42-S44). This allows to order the wallswhich may be detected in an unorganized manner at S24, to discard pointsnot corresponding to walls, and to perform the MRF robustly, even incase not all walls are detected at S24.

The method then assigns S54 to each point of the cycle of points a firstdatum which is a normal vector. In alternatives to the method of FIG. 3,the concave hull is already provided with such first data, for examplereceived from a distant system or retrieved in a database. The methodthen minimizes S60 the MRF energy. The method may perform the assignmentS54 in line with the sequence represented on FIG. 3 or interlaced withthe MRF minimization S60.

An efficient implementation of S54-S60 which was tested is now providedusing the following notations. In the following, indices belong to Z/nZfor convenience, so that i+1=0 when i=n−1.

Each point x_(i) can be associated with a unit normaln_(i)=u_(i)/∥u_(i)∥ where u_(i)(0)=X_(i−1)(1)−x_(i+1)(1) andu_(i)(1)=x_(i+1)(0)−x_(i−1)(0). n_(i) represents the approximate normalof the wall to which x_(i) belongs. (0) and (1) represent the twocoordinates of the 2D plan where the 2D point cloud is represented.

Then, the method may find the main mode in the distribution of thesenormals. For each normal n_(i) the method may count how many othernormals n_(j) form an angle lower than a predetermined threshold (e.g.lower than 20°, e.g. 10°) with n_(i). The method may weight the countfor each n_(j) by the length ∥x_(j−1)−x_(j+1)∥. The method may identifyand denote N₀ the normal associated to the highest count. N₀ is thenormal of one of the main wall directions.

The method may consider a finite set of possible second data which areangles between each wall and its neighboring walls: A={a₀, . . . ,a_(L−1)}, with a₀=0°. The more angles are allowed, the finest detailsthe method can catch in the layout, at the cost of a higher sensitivityto the noise in the layout point cloud. The method may for example takeA={0°, 45°, 90°, 135°} or A={0°, 15°, 30°, 45°, 60°, 75°, 90°, 105°,120°, 135°, 150°, 165°}, which allows to accurately model almost anylayout with a high robustness to noise in the input point cloud. But notheoretical limitation prevents the method to for example discretize ata finest level, such as 1°, which gives the method 360 possible labelsin set A.

Let N_(k) be the vector N₀ rotated of a_(k) degrees for all k∈{0, . . ., L−1}. These may be the labels of the MRF.

The method may associate to the layout cycle a pairwise MRF model toinfer the correct normal for each x_(i), which is equivalent to get thesegmentation and angle of each wall in the concave hull.

The data or unary term for x_(i) associated to the label k may be equalto D (x_(i),k)=1−|N_(k)·n_(i)|.

The smoothness or binary term for two connected vertices x_(i) withlabel k and x_(j) with label m may be equal to S(x_(i), x_(j), k,m)=1_(k≠m)|n_(i)·n_(j)|.

Let l(x_(i)) be the label associated to the vertex x_(i), i.e. thepossible exact normals.

The MRF energy associated to the model may be equal to E(l(x₀), . . . ,l(x_(n−1)))=Σ_(i=0) ^(n−1)D(x_(i),l(x_(i)))+λΣ_(i=0)^(n−1)S(x_(i),x_(i+1), l(x_(i)),l(x_(i+1))). λ may be a positive number,for example higher than 0.5. λ=2 was tested.

As the graph of the MRF is a single cycle, the method may in aparticular implementation solve it fast and exactly by running L beliefpropagations each time fixing a different label for x₀, which breaksdown the cycle to a chain, and finally by taking the lowest energy ofthe L configurations.

The belief propagations may be run as described in the following paper:

-   J. Yedidia, W. Freeman, Y. Weiss, “Understanding Belief Propagation    and Its Generalizations”, in Exploring Artificial Intelligence in    the New Millennium 2003.

The result of this discrete optimization yields as an output of S60 anaccurate inferred normal for each vertex of the initial concave hull.Thus for each vertex, the method knows the orientation of the wall towhich the vertex belongs. Whenever two adjacent vertices do not sharethe same normal orientation, it means to the method that they belong totwo different walls, and thus the method gets the segmentation of theinitial 2D hull in different walls by identifying S70 maximal sets ofconsecutive points to which a same second vector is assigned.

The method now has a concave hull representing approximately the floorplane. This concave hull consists in a single cycle of n 2D points {x₀,. . . , x_(n−1)}, each associated to a respective wall.

The method may then perform a layout optimization as follows.

Let W be the number of walls inferred by the MRF. The method can modelthe floor plan with a polygon of W 2d points: y₀, . . . , y_(W−1).

The method may initialize S82 each y_(j) by y_(j) ⁰ a function of (e.g.the mean between) the two consecutive vertices x_(i) and x_(i+1) whichare respectively associated to the consecutive walls j and j+1 (asbefore, the indices j belong to Z/WZ for convenience).

Let d_(j)=∥y_(j+1) ⁰−y_(j) ⁰∥ be the reference lengths of each wall.

Let m_(j)=y_(j+1)−y_(j).

The method may optimize S84 under a constraint of orthogonality betweeneach segment to be outputted and the second datum previously assigned tothe points of the respective maximal set corresponding to said segment.The method may notably optimize S84 the polygon representing the floorplan, with a constrained optimization, to force the inner angles of thepolygon to equal the angles inferred by the MRF, while preserving asmuch as possible the reference lengths of each wall.

An example of optimization S84 is now provided.

Let W_(j) be the normal of the wall j which was inferred by the MRF. Themethod may minimize:

${{\sum\limits_{j = 0}^{W - 1}{( {d_{j} - {m_{j}}} )^{2}\mspace{14mu} {under}\mspace{14mu} {the}\mspace{14mu} {constraint}}} < \frac{m_{j}}{m_{j}}},{W_{j}>={0\mspace{14mu} {for}\mspace{14mu} {all}\mspace{14mu} {j.}}}$

The method may alternatively minimize any other cost function thatpenalizes for each respective segment a distance between a resultingvalue of a length of the respective segment from the initial value ofthe length of the respective segment. In all cases, the minimization S84may be performed under the constraint of the angles previously inferredby the MRF.

The method may solve the problem using a penalty method, minimizing aseries of unconstrained problems,

${{\sum\limits_{j = 0}^{W - 1}( {d_{j} - {m_{j}}} )^{2}} + {\gamma( {{< \frac{m_{j}}{m_{j}}},{W_{j} >}} )}^{2}},$

starting from a very low γ and increasing it until the constraint ismet.

The penalty method may be as described in the following paper:

-   D. Bertsekas, “Constrained Optimization and Lagrange Multiplier    Methods”, in Athena Scientific 1996.

During the optimization y₀ and y₁ may be kept fixed, in order to removethe translation and rotational degrees of freedom of the layout in theoptimization. Each unconstrained problem is a nonlinear least squares,which can be solved using the Levenberg-Marquardt algorithm, but asimple Gauss-Newton scheme may also work as the method is always veryclose of the searched minimum.

The Levenberg-Marquardt algorithm may be as described in the followingpaper:

-   D. Marquardt, “An Algorithm for Least Square Estimation of    Non-Linear Parameters”, in Journal of the Society for Industrial and    Applied Mathematics 1963.

Once the optimization S84 is done, the method has an accurate floor planto output S86.

In an option, the method may further use the ceiling and floor planes tocompute the height of the room, and create a 3D polygonal model of thelayout.

FIG. 7 shows such a 3D polygonal model created from the 2D hull of FIG.6.

FIG. 8 shows the 3D polygonal model of FIG. 7 superposed on the initial3D point cloud of FIGS. 1-2.

FIG. 9 shows a top view of the superposition shown on FIG. 8.

As can be seen, the 3D polygonal model visually matches the initial 3Dpoint cloud.

FIG. 10 shows an example of the system, wherein the system is a clientcomputer system, e.g. a workstation of a user.

The client computer of the example comprises a central processing unit(CPU) 1010 connected to an internal communication BUS 1000, a randomaccess memory (RAM) 1070 also connected to the BUS. The client computeris further provided with a graphical processing unit (GPU) 1110 which isassociated with a video random access memory 1100 connected to the BUS.Video RAM 1100 is also known in the art as frame buffer. A mass storagedevice controller 1020 manages accesses to a mass memory device, such ashard drive 1030. Mass memory devices suitable for tangibly embodyingcomputer program instructions and data include all forms of nonvolatilememory, including by way of example semiconductor memory devices, suchas EPROM, EEPROM, and flash memory devices; magnetic disks such asinternal hard disks and removable disks; magneto-optical disks; andCD-ROM disks 1040. Any of the foregoing may be supplemented by, orincorporated in, specially designed ASICs (application-specificintegrated circuits). A network adapter 1050 manages accesses to anetwork 1060. The client computer may also include a haptic device 1090such as cursor control device, a keyboard or the like. A cursor controldevice is used in the client computer to permit the user to selectivelyposition a cursor at any desired location on display 1080. In addition,the cursor control device allows the user to select various commands,and input control signals. The cursor control device includes a numberof signal generation devices for input control signals to system.Typically, a cursor control device may be a mouse, the button of themouse being used to generate the signals. Alternatively or additionally,the client computer system may comprise a sensitive pad, and/or asensitive screen.

1. A computer-implemented method for determining an architecturallayout, the method comprising: obtaining a cycle of points thatrepresents a planar cross section of a cycle of walls, and, assigned toeach respective point, a respective first datum that represents adirection normal to the cycle of points at the respective point;minimizing a Markov Random Field (MRF) energy defined on the cycle ofpoints with labels taking values in a set of second data eachrepresenting a respective direction normal to the layout, therebyassigning, to each respective point, a respective one of the set ofsecond data, the MRF energy comprising a unary term that penalizes, foreach point, an angular distance between the direction represented by theassigned second datum and the direction represented by the assignedfirst datum, the MRF energy further comprising a binary term thatincreasingly penalizes, for each couple of consecutive points, anangular distance between the directions represented by the assignedsecond data as an angular distance between the directions represented bythe assigned first data decreases; identifying maximal sets ofconsecutive points to which a same second datum is assigned; anddetermining a cycle of vertices bounding a cycle of segments thatrepresents the architectural layout, each segment corresponding to arespective wall, each segment fitting a respective maximal set and beingnormal to the direction represented by the second datum assigned to thepoints of the respective maximal set.
 2. The method of claim 1, whereinthe minimizing of the MRF energy is exact.
 3. The method of claim 1,wherein the minimizing of the MRF energy is performed via one or morebelief propagations.
 4. The method of claim 1, wherein the first dataand the second data are vectors, and the angular distance between thedirection represented by an assigned second datum N_(k) and thedirection represented by an assigned first datum n_(i) is of the typeD(x_(i),k)=1−|N_(k)·n_(i)|, the angular distance between the directionsrepresented by assigned second data N_(k) and N_(m) is of the type1_(k≠m), and/or the angular distance between the directions representedby assigned first data n_(i) and n_(j) is of the type |n_(i)·n_(j)|. 5.The method of claim 4, wherein the MRF energy is of the type E(l(x₀), .. . , l(x_(n−1)))=Σ_(i=0) ^(n−1)D(x_(i),l(x_(i)))+λΣ_(i=0)^(n−1)S(x_(i),x_(i+1), l(x_(i)),l(x_(i+1))), where: {x₀, . . . ,x_(n−1)} is the cycle of points, with i+1=0 when i=n−1,D(x_(i),l(x_(i))) is the unary term, S(x_(i),x_(i+1),l(x_(i)),l(x_(i+1))) is the binary term, and λ is a positive number. 6.The method of claim 1, wherein each respective vertex corresponds to arespective first point and to a respective second point, the respectivefirst point being the ending point of the maximal set corresponding to arespective segment bounded by the respective vertex, the respectivesecond point being the starting point of the maximal set correspondingto the respective other segment bounded by the respective vertex, thedetermining of the respective vertex comprising: determining an initialposition of the respective vertex as a function of the respective firstpoint and the respective second point; and optimizing the initialposition.
 7. The method of claim 6, wherein the function of therespective first point and the respective second point is the meanfunction.
 8. The method of claim 6, wherein the optimizing minimizes acost function that penalizes for each respective segment a distancebetween a resulting value of a length of the respective segment from theinitial value of the length of the respective segment.
 9. The method ofclaim 1, wherein the cycle of points is a concave hull of a 2D pointcloud that corresponds to a projection of a 3D point cloud representingthe cycle of walls on a projection plane, the projection planecorresponding to the planar cross section.
 10. The method of claim 9,wherein the projection plane represents the floor plane and/or theprojection is a vertical projection.
 11. The method of claim 9, whereinthe obtaining of the cycle of points comprises: obtaining a 3D pointcloud representing a room that includes the cycle of walls; identifyingthe projection plane and the 3D point cloud representing the cycle ofwalls from the 3D point cloud representing the room; projecting the 3Dpoint cloud representing the cycle of walls on the projection plane;determining the 2D point cloud; and determining the concave hull. 12.The method of claim 11, wherein the identifying of the projection planeand of the 3D point cloud representing the cycle of walls comprisesdetecting planes in the 3D point cloud representing the room with arandom sample consensus algorithm.
 13. The method of claim 12, whereinthe determining of the 2D point cloud comprises, for each detectedplane, projecting the result of the projection of the plane on a linearregression of the result.
 14. A non-transitory computer-readable mediumhaving stored thereon a computer program comprising instructions forperforming a computer-implemented method for determining anarchitectural layout, the method comprising: obtaining a cycle of pointsthat represents a planar cross section of a cycle of walls, and,assigned to each respective point, a respective first datum thatrepresents a direction normal to the cycle of points at the respectivepoint; minimizing a Markov Random Field (MRF) energy defined on thecycle of points with labels taking values in a set of second data eachrepresenting a respective direction normal to the layout, therebyassigning, to each respective point, a respective one of the set ofsecond data, the MRF energy comprising a unary term that penalizes, foreach point, an angular distance between the direction represented by theassigned second datum and the direction represented by the assignedfirst datum, the MRF energy further comprising a binary term thatincreasingly penalizes, for each couple of consecutive points, anangular distance between the directions represented by the assignedsecond data as an angular distance between the directions represented bythe assigned first data decreases; identifying maximal sets ofconsecutive points to which a same second datum is assigned; anddetermining a cycle of vertices bounding a cycle of segments thatrepresents the architectural layout, each segment corresponding to arespective wall, each segment fitting a respective maximal set and beingnormal to the direction represented by the second datum assigned to thepoints of the respective maximal set.
 15. A computer system comprising aprocessor coupled a memory, the memory having stored thereon a computerprogram comprising instructions for performing a computer-implementedmethod for determining an architectural layout that when implemented bythe processor cause the processor to be configured to: obtain a cycle ofpoints that represents a planar cross section of a cycle of walls, and,assigned to each respective point, a respective first datum thatrepresents a direction normal to the cycle of points at the respectivepoint, minimize a Markov Random Field (MRF) energy defined on the cycleof points with labels taking values in a set of second data eachrepresenting a respective direction normal to the layout, therebyassigning, to each respective point, a respective one of the set ofsecond data, the MRF energy comprising a unary term that penalizes, foreach point, an angular distance between the direction represented by theassigned second datum and the direction represented by the assignedfirst datum, the MRF energy further comprising a binary term thatincreasingly penalizes, for each couple of consecutive points, anangular distance between the directions represented by the assignedsecond data as an angular distance between the directions represented bythe assigned first data decreases, identify maximal sets of consecutivepoints to which a same second datum is assigned, and determine a cycleof vertices bounding a cycle of segments that represents thearchitectural layout, each segment corresponding to a respective wall,each segment fitting a respective maximal set and being normal to thedirection represented by the second datum assigned to the points of therespective maximal set.
 16. The system of claim 15, wherein theminimizing of the MRF energy is exact.
 17. The system of claim 15,wherein the minimizing of the MRF energy is performed via one or morebelief propagations.
 18. The system of claim 15, wherein the first dataand the second data are vectors, and the angular distance between thedirection represented by an assigned second datum N_(k) and thedirection represented by an assigned first datum n_(i) is of the typeD(x_(i),k)=1−|N_(k)·n_(i)|, the angular distance between the directionsrepresented by assigned second data N_(k) and N_(m) is of the type1_(k≠m), and/or the angular distance between the directions representedby assigned first data n_(i) and n_(j) is of the type |n_(i)·n_(j)|. 19.The system of claim 18, wherein the MRF energy is of the type E(l(x₀), .. . , l(x_(n−1)))=Σ_(i=0) ^(n−1)D(x_(i),l(x_(i)))+λΣ_(i=0)^(n−1)S(x_(i),x_(i+1), l(x_(i)),l(x_(i+1))), where: {x₀, . . . ,x_(n−1)} is the cycle of points, with i+1=0 when i=n−1,D(x_(i),l(x_(i))) is the unary term, S(x_(i),x_(i+1),l(x_(i)),l(x_(i+1))) is the binary term, and λ is a positive number. 20.The system of claim 15, wherein each respective vertex corresponds to arespective first point and to a respective second point, the respectivefirst point being the ending point of the maximal set corresponding to arespective segment bounded by the respective vertex, the respectivesecond point being the starting point of the maximal set correspondingto the respective other segment bounded by the respective vertex, theprocessor is configured to determine the respective vertex by beingfurther configured to: determine an initial position of the respectivevertex as a function of the respective first point and the respectivesecond point, and optimize the initial position.